home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / X11 / Fresco / build / Unix / config / cf / sun.cf < prev    next >
Text File  |  1995-07-12  |  8KB  |  305 lines

  1. XCOMM platform:  $XConsortium: sun.cf,v 1.139 95/01/12 15:30:26 kaleb Exp $
  2.  
  3. #ifdef SVR4Architecture
  4. #ifdef i386Architecture
  5. #define OSName            SunOS 5.1 x86
  6. XCOMM operating system:  OSName
  7. #define OSMajorVersion    5
  8. #define OSMinorVersion    1
  9. #define OSTeenyVersion    0
  10. #else
  11. #define OSName            SunOS 5.4
  12. XCOMM operating system:  OSName
  13. #define OSMajorVersion    5
  14. #define OSMinorVersion    4
  15. #define OSTeenyVersion    0
  16. #endif
  17. #else
  18. #define OSName            SunOS 4.1.3
  19. XCOMM operating system:  OSName
  20. #define OSMajorVersion    4
  21. #define OSMinorVersion    1
  22. #define OSTeenyVersion    3
  23. #endif
  24.  
  25. #ifndef SVR4Architecture
  26. #ifndef DefsImplNeedLibs
  27. #define DefsImplNeedLibs /**/
  28. #endif
  29. #endif
  30.  
  31. /*
  32.  * Compiler setup.  This sun.cf file knows what options to use with 
  33.  * certain compilers, including Sun C, CenterLine C, and gcc.  It 
  34.  * also understands how to set some of the options for various C++
  35.  * compilers, including Sun C++ and CenterLine C++.
  36.  *
  37.  * === C Compiler Setup ==========================================
  38.  *
  39.  * For SunPro C, define HasSunC to YES in site.def.  
  40.  * For CenterLine C, define HasCenterLineC to YES in site.def
  41.  * For gcc or gcc2, define HasGcc or HasGcc2 to YES in site.def
  42.  * For other compilers, define HasSunC to NO in site.def, then 
  43.  *    provide appropriate values for the various compiler related
  44.  *    configuration varibles used here.
  45.  * 
  46.  * If you say you have the SunPro C compiler, we assume you have 
  47.  * version 2.0.x of the compiler.  If you have version 3.0.x instead, 
  48.  * define CCompilerMajorVersion as 3 in site.def
  49.  *
  50.  * If you don't tell us which C compiler you have, we assume you have 
  51.  * the SunPro C compiler under Solaris 2.x, and the bundled /bin/cc 
  52.  * under SunOS 4.1.x
  53.  *
  54.  * === C++ Compiler Setup ==========================================
  55.  *
  56.  * For SunPro C++, define HasSunCplusplus to YES in site.def
  57.  * For CenterLine C++, define HasCenterLineCplusplus to YES in site.def
  58.  * For Gnu g++ 2.6.x, define HasGcc2ForCplusplus to YES in site.def
  59.  * For other compilers, define HasCplusplus to YES in site.def, and 
  60.  *    check to see if you need to provide values for CplusplusOptions
  61.  *    and/or DefaultCplusplusOptions.
  62.  *
  63.  * In any case, you may also need to set CplusplusDependIncludes.
  64.  *
  65.  * If you say you have the SunPro C++ compiler, we assume you have 
  66.  * version 3.0.x of the compiler.  If you have version 4.0.x instead, 
  67.  * define CplusplusCompilerMajorVersion as 4 in site.def.
  68.  *
  69.  */
  70.  
  71. #ifndef HasSunC
  72. #if (HasCenterLineC || HasGcc || HasGcc2 || OSMajorVersion < 5)
  73. #define HasSunC NO
  74. #else
  75. #define HasSunC YES
  76. #endif
  77. #endif
  78.  
  79. #if HasSunC 
  80. #ifndef CCompilerMajorVersion
  81. #define CCompilerMajorVersion 2
  82. #endif
  83. #endif
  84.  
  85. #if HasSunCplusplus
  86. #ifndef HasCplusplus
  87. #define HasCplusplus YES
  88. #endif
  89. #ifndef HasCplusplusMinusCMinusO
  90. #define HasCplusplusMinusCMinusO YES
  91. #endif
  92. #ifndef CplusplusCompilerMajorVersion
  93. #define CplusplusCompilerMajorVersion 3
  94. #endif
  95. #endif
  96.  
  97. #if HasCenterLineC
  98. #ifndef CcCmd
  99. #define CcCmd clcc
  100. #endif
  101. #endif
  102.  
  103. #if HasCenterLineCplusplus
  104. #ifndef HasCplusplus
  105. #define HasCplusplus YES
  106. #endif
  107. #ifndef DefaultCplusplusOptions
  108. #define DefaultCplusplusOptions -Xa
  109. #endif
  110. #ifndef CplusplusOptions
  111. #define CplusplusOptions -Xa
  112. #endif
  113. #endif
  114.  
  115. #if HasGcc2ForCplusplus
  116. #ifndef HasCplusplusMinusCMinusO
  117. #define HasCplusplusMinusCMinusO YES
  118. #endif
  119. #endif
  120.  
  121. /*
  122.  * Gnu g++ 2.6.0 cannot build working C++ shared libraries under Solaris 2
  123.  */
  124. #if HasGcc2ForCplusplus && OSMajorVersion > 4
  125. #ifndef SharedLibFresco
  126. #define SharedLibFresco NO
  127. #endif
  128. #ifndef SharedLibXtf
  129. #define SharedLibXtf NO
  130. #endif
  131. #endif
  132.  
  133. #if OSMajorVersion < 4 || (OSMajorVersion == 4 && OSMinorVersion < 1)
  134. /* We do not guarantee this will work */
  135. #define BootstrapCFlags   -DNOSTDHDRS
  136. #define StandardDefines   -DNOSTDHDRS
  137. #define XawI18nDefines     -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
  138. #endif
  139.  
  140. #if OSMajorVersion == 4 
  141. #if OSMinorVersion == 1
  142. #define HasPoll           YES
  143. #endif
  144. #if OSMinorVersion > 1 || (OSMinorVersion == 1 && OSTeenyVersion > 1)
  145. /* You ALSO need this if you have Sun ld patch 100170-06 or later to 4.1.1 */
  146. #define SunPost411FCSLd      YES
  147. #endif
  148. #endif
  149.  
  150. #ifdef i386Architecture
  151. #if OSMajorVersion > 4
  152. #define ServerExtraDefines AllocateLocalDefines XFree86ServerDefines
  153. #define ServerOSDefines    XFree86ServerOSDefines
  154. #else
  155. #define ServerExtraDefines AllocateLocalDefines
  156. #define ServerOSDefines   -DDDXOSINIT
  157. #endif
  158. #else
  159. #define ServerExtraDefines AllocateLocalDefines
  160. #define ServerOSDefines   -DDDXOSINIT
  161. #endif
  162.  
  163. #if OSMajorVersion > 4
  164. #define BootstrapCFlags      -DSVR4
  165. #ifndef XawI18nDefines
  166. #define XawI18nDefines    -DHAS_WCTYPE_H -DHAS_ISW_FUNCS
  167. #endif
  168. #ifdef i386Architecture
  169. #define StandardDefines      -Dsun -Di386 -DSVR4 -D__i386
  170. #else
  171. #define StandardDefines      -Dsun -DSVR4
  172. #endif
  173. #define ExtraLibraries    -lsocket -lnsl
  174. #if OSMinorVersion > 1
  175. #define ThreadedX      YES
  176. #if HasSunC && CCompilerMajorVersion > 2
  177. #define ThreadsCompileFlags -mt
  178. #else
  179. #define SystemMTDefines -D_REENTRANT
  180. #define ThreadsLibraries -lthread
  181. #endif
  182. #if HasSunCplusplus && CplusplusCompilerMajorVersion > 3
  183. #define ThreadsCplusplusCompileFlags -mt
  184. #else
  185. #define CplusplusSystemMTDefines -D_REENTRANT
  186. #define ThreadsCplusplusLibraries -lthread
  187. #endif
  188. #endif         /* OSMinorVersion > 1 */
  189. #define HasVFork          NO
  190. #define InstKmemFlags      -g sys -m 2755
  191. #define ShLibIncludeFile <sunLib.tmpl>
  192. /*
  193.  * Set flags for position independent code before including sv4Lib.rules
  194.  * if the compiler in use doesn't use standard SVR4 flags
  195.  */
  196. #if HasSunC || HasCenterLineC
  197. #define PositionIndependentCFlags -Kpic
  198. #endif
  199. #if HasSunCplusplus || HasCenterLineCplusplus
  200. #define PositionIndependentCplusplusFlags -pic
  201. #endif
  202. #else
  203. #define InstKmemFlags      -g kmem -m 2755
  204. #include <sunLib.rules>
  205. #endif
  206.  
  207. #define HasNdbm          YES
  208. #define HasShm          YES
  209. #define HasSecureRPC      YES
  210. #define SetTtyGroup      YES
  211. #define HasPutenv      YES
  212. #ifndef i386Architecture
  213. #ifndef Xsun24Server
  214. #define Xsun24Server      NO        /* color, mono, multiple depths */
  215. #endif
  216. #ifndef XsunServer
  217. #define XsunServer      YES        /* color and mono, 8 bit only */
  218. #endif
  219. #ifndef XsunMonoServer
  220. #define XsunMonoServer      NO        /* monochrome only */
  221. #endif
  222. #endif /* not i386Architecture */
  223. #ifndef BuildPexExt
  224. #define BuildPexExt      (XsunServer || Xsun24Server)
  225. #endif
  226. #ifndef BuildXKB
  227. #define    BuildXKB      YES
  228. #endif
  229.  
  230. #if HasGcc
  231. #if OSMajorVersion > 4 && defined(i386Architecture)
  232. #ifndef DefaultCCOptions
  233. #if OSMinorVersion == 1
  234. #define DefaultCCOptions -DNO_ASM
  235. #else
  236. #define DefaultCCOptions -ansi -DNO_ASM
  237. #endif
  238. #endif
  239. #endif
  240. #if HasGcc2
  241. #define OptimizedCDebugFlags -O2
  242. #else
  243. #define SharedLibraryCcCmd cc
  244. #define ExtraLoadFlags -B/usr/bin/
  245. #define AllocateLocalDefines /**/
  246.  
  247. .c.o:
  248.     $(CC) -c $(CFLAGS) $*.c
  249.  
  250. #endif /* HasGcc2 (else) */
  251. #else /* not HasGcc */
  252.  
  253. #define AllocateLocalDefines -DINCLUDE_ALLOCA_H
  254.  
  255. /* Set up compiler-dependent options for Sun C */
  256.  
  257. #if HasSunC
  258. #ifdef Sun3Architecture
  259. #ifndef DefaultCCOptions
  260. #define DefaultCCOptions -f68881 -pipe
  261. #endif
  262. #else    /* not defined(Sun3Architecture) */
  263. #if OSMajorVersion < 5
  264. #ifndef DefaultCCOptions
  265. #define DefaultCCOptions -pipe
  266. #endif
  267. #else    /* OSMajorVersion >= 5*/
  268. #ifndef DefaultCCOptions
  269. #define DefaultCCOptions /* nothing */
  270. #endif
  271. #endif    
  272. #endif    
  273. #endif
  274.  
  275. /* Set compiler-dependent options for CenterLine C */
  276.  
  277. #if HasCenterLineC
  278. #ifndef    DefaultCCOptions
  279. #define DefaultCCOptions -Xt -w1 -DANSICPP -U__HIGHC__
  280. #endif
  281. #ifndef NeedConstPrototypes
  282. #define NeedConstPrototypes YES
  283. #endif
  284. #ifndef NeedNestedPrototypes
  285. #define NeedNestedPrototypes YES
  286. #endif
  287. #ifndef NeedVarargsPrototypes
  288. #define NeedVarargsPrototypes YES
  289. #endif
  290. #endif
  291.  
  292.  
  293. #define PexCCOptions DefaultCCOptions
  294.  
  295. #endif /* HasGcc (else) */
  296.  
  297. #if OSMajorVersion < 5
  298. #define SharedAllocateLocalDefines -DINCLUDE_ALLOCA_H
  299. #define LibraryCCOptions /* don't want special floating point */
  300. #endif
  301.  
  302. #if OSMajorVersion > 4
  303. #include <svr4.cf>
  304. #endif
  305.